package com.liyang.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @BelongsProject: cloud-2024
 * @BelongsPackage: com.liyang.myrule
 * @Author: liyang
 * @CreateTime: 2023-12-26  14:22
 * @Description: 修改  负载均衡  轮询规则
 * @Version: 1.0
 */
@Configuration
public class MySelfRule {

    @Bean
    public IRule myRule() {
        // 随机
        return new RandomRule();
    }
}
